<div class="content-section implementation GridDemo clearfixes">

  <form class="form-horizontal construction" [formGroup]="constructionForm" *ngIf="viewState === 'add'"   >
    <p-panel >
      <p-header>
        <div class="ui-helper-clearfix">
          <span class="ui-panel-title" style="font-size:16px;display:inline-block;margin-top:2px"></span>
          <button class="save"  pButton type="button"  label="返回" (click)="goBack(constructionData[i])"  > </button>
          <button class="save"  pButton type="submit" [ngStyle]="{'float':'right'}" label="提交" (click)="formSubmit()"   ></button>
          <button class="save" pButton type="submit" [ngStyle]="{'float':'right'}" (click)="formSave()" label="保存"  ></button>
        </div>
      </p-header>
      <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >施工单号:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="sid"  name="inspectionName"   type="text" pInputText   placeholder="系统自动获取"  readonly>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >状态:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-dropdown formControlName="status"  [options]="statusNames" [autoWidth]="false" name="cycle"  [(ngModel)]="submitData.status"  readonly="true"></p-dropdown>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >受理人:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  type="text" pInputText  name="allowed" formControlName="creator"
                    readonly class="cursor_not_allowed" value="{{personalData.name}}" [(ngModel)]="submitData.creator"/>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >受理时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="create_time" pInputText type="text"  name="startTime" [(ngModel)]="submitData.create_time" readonly   class="no-border"/>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label ><span>*</span>申请人:</label>
          </div>
          <div class="ui-grid-col-3">
            <input formControlName="submitter"  type="text" pInputText   placeholder="申请人"
                   readonly class="cursor_not_allowed"  [(ngModel)]="submitData.submitter" />
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['submitter'].valid&&(!constructionForm.controls['submitter'].untouched)" >
              <i class="fa fa-close"></i>
              申请人必填
            </div>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showPersonMask('add')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearTreeDialog('add')" label="清空" ></button>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >申请时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="submit_time" pInputText type="text"  name="startTime" [(ngModel)]="submitData.submit_time" readonly   class="no-border"/>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >所属组织:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="submitter_org"  name="inspectionName"   type="text" pInputText   placeholder="所属组织" [(ngModel)]="submitData.submitter_org"   readonly>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label ><span></span>联系电话:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="submitter_phone"    type="text" pInputText   placeholder="联系电话" [(ngModel)]="submitData.submitter_phone"  readonly>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw" formGroupName="timeGroup">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>计划开始时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              formControlName="startTime"
              [showIcon]="true"
              [locale]="zh"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [minDate]="nowDate"
              [showTime]="true"
              [(ngModel)]="submitData.construction_plantime_start" >
            </p-calendar>
            <div [hidden]="constructionForm.get(['timeGroup','startTime']).valid||constructionForm.get(['timeGroup','startTime']).untouched">
              <div class="ui-message ui-messages-error ui-corner-all"  [hidden]="!constructionForm.hasError('required',['timeGroup','startTime'])">
                <i class="fa fa-close"></i>
                计划开始时间必填
              </div>
            </div>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>计划结束时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              formControlName="endTime"
              [showIcon]="true" [locale]="zh" name="return_time"
              [styleClass]="'schedule-add'" dateFormat="yy-mm-dd" [required]="true" dataType="string"
              [minDate]="nowDate" [(ngModel)]="submitData.construction_plantime_end"
              [showTime]="true"
            >
            </p-calendar>
            <div [hidden]="constructionForm.get(['timeGroup','endTime']).valid||constructionForm.get(['timeGroup','endTime']).untouched">
              <div class="ui-message ui-messages-error ui-corner-all"  [hidden]="!constructionForm.hasError('required',['timeGroup','endTime'])" >
                <i class="fa fa-close"></i>
                计划结束时间必填
              </div>
            </div>
            <div class="ui-message ui-messages-error ui-corner-all"  *ngIf="constructionForm.hasError('time','timeGroup')" >
              <i class="fa fa-close"></i>
              {{constructionForm.getError('time','timeGroup')?.descxxx}}
            </div>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label ><span>*</span>施工类型:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-autoComplete
              ngClass="ui-fluid"
              formControlName="construction_type"
              [(ngModel)]="submitData.construction_types"
              [suggestions]="categories"
              (completeMethod)="constructionMultipe()"
              [minLength]="1"
              [required]="true"
              placeholder="请选择施工类型"
              field="name"
              [multiple]="true"
              name="test"
              [dropdown]="true"
            >
            </p-autoComplete>
          </div>

          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>部门审批人:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-dropdown [autoWidth]="false" formControlName="org_approver" name="fenlei"  [(ngModel)]="submitData.org_approver" [options] = "dropDownData"></p-dropdown>

          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >影响业务:</label>
          </div>
          <div class="ui-grid-col-5">
            <ng-container *ngFor="let radio of radioButton">
              <p-radioButton formControlName="is_affected" name="group" value="{{radio.value}}" label="{{radio.label}}" (click)="affected(radio.value)" [(ngModel)]="submitData.is_affected"></p-radioButton>
            </ng-container>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw" *ngIf="submitData.is_affected === 'true'">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label ><span>*</span>影响开始时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              [showIcon]="true"
              [locale]="zh"
              formControlName="construction_affecttime_start"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [minDate]="nowDate"
              [showTime]="true"
              [(ngModel)]="submitData.construction_affecttime_start"
            >
            </p-calendar>
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construction_affecttime_start'].valid&&(!constructionForm.controls['construction_affecttime_start'].untouched)" >
              <i class="fa fa-close"></i>
              影响开始时间必填
            </div>
          </div>
          <div class="ui-grid-col-1 text-right" >
            <label ><span>*</span>影响结束时间:</label>
          </div>
          <div class="ui-grid-col-5"  >
            <p-calendar
              [showIcon]="true"
              [locale]="zh"
              formControlName="construction_affecttime_end"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [showTime]="true"
              [minDate]="nowDate"
              [maxDate]="MaxDate"
              [(ngModel)]="submitData.construction_affecttime_end"
            >
            </p-calendar>
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construction_affecttime_end'].valid&&(!constructionForm.controls['construction_affecttime_end'].untouched)" >
              <i class="fa fa-close"></i>
              影响结束时间必填
            </div>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>施工区域:</label>
          </div>
          <div class="ui-grid-col-9">
            <input formControlName="construct_location"  type="text" pInputText  name="inspectiondepartment" placeholder="施工区域"
                   readonly class="cursor_not_allowed"   [(ngModel)]="submitData.construct_location"   />
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construct_location'].valid&&(!constructionForm.controls['construct_location'].untouched)" >
              <i class="fa fa-close"></i>
              施工区域必填
            </div>
          </div>
          <!--<div class="ui-grid-col-9 hidden">-->
            <!--<input formControlName="construct_location"  type="text" pInputText  name="inspectiondepartment" placeholder="施工区域"-->
                   <!--readonly class="cursor_not_allowed"   [(ngModel)]="submitData.construct_location"   />-->
          <!--</div>-->
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showLocationMask('add')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearConstructionLocation('add')" label="清空" ></button>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw"  *ngIf="submitData.is_affected === 'true'">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>影响区域:</label>
          </div>
          <div class="ui-grid-col-9">
            <input formControlName="affected_location"  type="text" pInputText  name="affected_location" placeholder="影响区域"
                   readonly class="cursor_not_allowed"   [(ngModel)]="submitData.affected_location"  />
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['affected_location'].valid&&(!constructionForm.controls['affected_location'].untouched)" >
              <i class="fa fa-close"></i>
              影响区域必填
            </div>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showAffectMask('add')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearaffectLocationDialog()" label="清空" ></button>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span></span>施工内容:</label>
          </div>
          <div class="ui-grid-col-11">
            <textarea formControlName="construction_content"  pInputTextarea type="text" [(ngModel)]="submitData.construction_content" ></textarea>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>施工内容详述:</label>
          </div>
          <div class="ui-grid-col-11">
            <textarea formControlName="construction_description"  pInputTextarea type="text" [(ngModel)]="submitData.construction_description" ></textarea>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >上传附件:</label>
          </div>
          <div class="ui-grid-col-11">
            <p-fileUpload  name="file"
                           url="{{ip}}/workflow/construction/upload"
                           multiple="multiple"
                           accept="image/*,application/*,text/*"
                           (onUpload)="onBasicUploadAuto($event)"
                           maxFileSize="3145728"
                           chooseLabel="选择"
                           uploadLabel="上传"
                           cancelLabel="取消"
                           (onBeforeUpload)="onBeforeUpload($event)"
            ></p-fileUpload>
            <ng-template pTemplate="ui-button-text">
              <div>选择文件</div>
            </ng-template>
          </div>
        </div>

      </div>
    </p-panel>

    <div class="ui-grid-row margin-bottom-1vw">
      <div class="ui-grid-col-2">
      </div>
    </div>
    <label></label>
    <div class="" >
      <div class="ui-g">
        <div class="ui-g-10 ui-sm-12" >
          <div class="ui-g-2  ui-sm-5 ui-fluid">
          </div>
          <div class="ui-g-2 ui-sm-5 ui-fluid  ui-no-padding-right-15px ">
          </div>
        </div>
        <div class="ui-g-2 ui-sm-12" >
          <div class="ui-g-6  ui-sm-6  ui-fluid">
            <!--<button   pButton   (click)="deleteStorage()" label="移除" [disabled]="selectConstructions.length===0 || selectConstructions.length>1"  ></button>-->
          </div>
          <div class="ui-g-6 ui-sm-6 ui-fluid  ui-no-padding-right-15px ">
            <button pButton   (click)="showAddEquementMask()" label="添加设备" [disabled]="submitData.construct_location === ''" ></button>
          </div>
        </div>
      </div>
    </div>
    <label><span></span>设备列表</label>
    <p-dataTable [value]="inspections" (onLazyLoad)="loadCarsLazy($event)" [lazy]="true" [rows]="10" [paginator]="true"
                 [totalRecords]="totalRecords"  [(selection)]="selectConstructions" [editable]="true"   [rowsPerPageOptions]="[5,10,20]">
      <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
      <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}" [editable]="col.editable"></p-column>
      <ng-template pTemplate="emptymessage" >
        当前没有数据
      </ng-template>
      <p-column header="操作">
        <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
          <button  pButton type="button"  label="移除"   (click)="deleteStorage()" [disabled]="selectConstructions.length===0 || selectConstructions.length>1"  ></button>
        </ng-template>
      </p-column>

    </p-dataTable>
  </form>
  <form class="form-horizontal construction" [formGroup]="constructionForm" *ngIf="viewState === 'update'"   >
    <p-panel >
      <p-header>
        <div class="ui-helper-clearfix">
          <span class="ui-panel-title" style="font-size:16px;display:inline-block;margin-top:2px"></span>
          <button class="save"  pButton type="button"  label="返回" (click)="goBack(constructionData[i])"> </button>
          <button class="save"  pButton type="submit" [ngStyle]="{'float':'right'}" label="提交" (click)="formSubmit()"   ></button>
          <button class="save" pButton type="submit" [ngStyle]="{'float':'right'}" (click)="formSave()" label="保存"  ></button>
        </div>
      </p-header>
      <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >施工单号:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="sid"  name="inspectionName"   type="text" pInputText   placeholder="系统自动获取" [(ngModel)]="constructionData.sid" readonly>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >状态:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-dropdown formControlName="status"  [options]="statusNames" [autoWidth]="false" name="cycle"  [(ngModel)]="constructionData.status"  readonly="true"></p-dropdown>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >受理人:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  type="text" pInputText  name="allowed" formControlName="creator"
                    readonly class="cursor_not_allowed"  [(ngModel)]="constructionData.creator"/>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >受理时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="create_time" pInputText type="text"  name="startTime" [(ngModel)]="constructionData.create_time" readonly   class="no-border"/>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >申请人:</label>
          </div>
          <div class="ui-grid-col-3">
            <input formControlName="submitter"  type="text" pInputText  name="inspectiondepartment" placeholder="申请人"
                   readonly class="cursor_not_allowed"  [(ngModel)]="constructionData.submitter" />
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['submitter'].valid&&(!constructionForm.controls['submitter'].untouched)" >
              <i class="fa fa-close"></i>
              申请人必填
            </div>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showPersonMask('apply')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearTreeDialog('apply')" label="清空" ></button>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >申请时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="submit_time" pInputText type="text"  name="startTime" [(ngModel)]="constructionData.submit_time" readonly   class="no-border"/>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >所属组织:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="submitter_org"  name="inspectionName"   type="text" pInputText   placeholder="所属组织" [(ngModel)]="constructionData.submitter_org"   readonly>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label ><span></span>联系电话:</label>
          </div>
          <div class="ui-grid-col-5">
            <input  formControlName="submitter_phone"    type="text" pInputText   placeholder="联系电话" [(ngModel)]="constructionData.submitter_phone"  readonly>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw" formGroupName="timeGroup">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>计划开始时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              formControlName="startTime"
              [showIcon]="true"
              [locale]="zh"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [minDate]="nowDate"
              [showTime]="true"

              [(ngModel)]="constructionData.construction_plantime_start" >
            </p-calendar>
            <div [hidden]="constructionForm.get(['timeGroup','startTime']).valid||constructionForm.get(['timeGroup','startTime']).untouched">
              <div class="ui-message ui-messages-error ui-corner-all"  [hidden]="!constructionForm.hasError('required',['timeGroup','startTime'])">
                <i class="fa fa-close"></i>
                计划开始时间必填
              </div>
            </div>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>计划结束时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              formControlName="endTime"
              [showIcon]="true" [locale]="zh" name="return_time"
              [styleClass]="'schedule-add'" dateFormat="yy-mm-dd" [required]="true" dataType="string"
              [minDate]="nowDate" [(ngModel)]="constructionData.construction_plantime_end" [showTime]="true"
            >
            </p-calendar>
            <div [hidden]="constructionForm.get(['timeGroup','endTime']).valid||constructionForm.get(['timeGroup','endTime']).untouched">
              <div class="ui-message ui-messages-error ui-corner-all"  [hidden]="!constructionForm.hasError('required',['timeGroup','endTime'])" >
                <i class="fa fa-close"></i>
                计划结束时间必填
              </div>
            </div>
            <div class="ui-message ui-messages-error ui-corner-all"  *ngIf="constructionForm.hasError('time','timeGroup')" >
              <i class="fa fa-close"></i>
              {{constructionForm.getError('time','timeGroup')?.descxxx}}
            </div>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label ><span>*</span>施工类型:</label>
          </div>
          <div class="ui-grid-col-5">
            <!--<p-dropdown [autoWidth]="false" formControlName="construction_type" [options]="categories"  name="fenlei" [(ngModel)]="constructionData.construction_type" ></p-dropdown>-->
            <p-autoComplete
              ngClass="ui-fluid"
              formControlName="construction_type"
              [(ngModel)]="constructionData.construction_types"
              [suggestions]="categories"
              (completeMethod)="constructionMultipe()"
              [minLength]="1"
              [required]="true"
              placeholder="请选择施工类型"
              field="name"
              [multiple]="true"
              name="test"
              [dropdown]="true"
            >
            </p-autoComplete>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>部门审批人:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-dropdown [autoWidth]="false" formControlName="org_approver" name="fenlei"  [(ngModel)]="constructionData.org_approver" [options] = "updatedropDownData"></p-dropdown>

          </div>

        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label >影响业务:</label>
          </div>
          <div class="ui-grid-col-5">
            <ng-container *ngFor="let radio of radioButton">
              <p-radioButton formControlName="is_affected" name="group" value="{{radio.value}}" label="{{radio.label}}" (click)="affected(radio.value)" [(ngModel)]="constructionData.is_affected"></p-radioButton>
            </ng-container>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw" *ngIf="constructionData.is_affected === 'true'">
          <div class="ui-grid-col-1 ui-padding-10px text-right">
            <label ><span>*</span>影响开始时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <p-calendar
              [showIcon]="true"
              [locale]="zh"
              formControlName="construction_affecttime_start"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [minDate]="nowDate"
              [showTime]="true"
              [(ngModel)]="constructionData.construction_affecttime_start"
            >
            </p-calendar>
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construction_affecttime_start'].valid&&(!constructionForm.controls['construction_affecttime_start'].untouched)" >
              <i class="fa fa-close"></i>
              影响开始时间必填
            </div>
          </div>
          <div class="ui-grid-col-1 text-right" >
            <label ><span>*</span>影响结束时间:</label>
          </div>
          <div class="ui-grid-col-5"  >
            <p-calendar
              [showIcon]="true"
              [locale]="zh"
              formControlName="construction_affecttime_end"
              [styleClass]="'schedule-add'"
              dateFormat="yy-mm-dd"
              [required]="true"
              dataType="string"
              [minDate]="nowDate"
              [showTime]="true"
              [(ngModel)]="constructionData.construction_affecttime_end"
            >
            </p-calendar>
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construction_affecttime_end'].valid&&(!constructionForm.controls['construction_affecttime_end'].untouched)" >
              <i class="fa fa-close"></i>
              影响结束时间必填
            </div>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>施工区域:</label>
          </div>
          <div class="ui-grid-col-9">
            <input formControlName="construct_location"  type="text" pInputText  name="inspectiondepartment" placeholder="施工区域"
                   readonly class="cursor_not_allowed"   [(ngModel)]="constructionData.construct_location"   />
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construct_location'].valid&&(!constructionForm.controls['construct_location'].untouched)" >
              <i class="fa fa-close"></i>
              施工区域必填
            </div>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showLocationMask('update')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearConstructionLocation('update')" label="清空" ></button>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw" *ngIf="constructionData.is_affected === 'true'">
          <div class="ui-grid-col-1 text-right">
            <label >影响区域:</label>
          </div>
          <div class="ui-grid-col-9">
            <input formControlName="affected_location"  type="text" pInputText  name="affected_location" placeholder="影响区域"
                   readonly class="cursor_not_allowed"  [(ngModel)]="constructionData.affected_location"   />
          </div>
          <div class="ui-grid-col-1">
            <button pButton  type="button" (click)="showAffectMask('update')" label="选择" ></button>
          </div>
          <div class="ui-grid-col-1">
            <button pButton  (click)="clearaffectLocationDialog()" label="清空" ></button>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span></span>施工内容:</label>
          </div>
          <div class="ui-grid-col-11">
            <textarea formControlName="construction_content"  pInputTextarea type="text" [(ngModel)]="constructionData.construction_content" ></textarea>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>施工内容详述:</label>
          </div>
          <div class="ui-grid-col-11">
            <textarea formControlName="construction_description"  pInputTextarea type="text" [(ngModel)]="constructionData.construction_description" ></textarea>
            <div class="ui-message ui-messages-error ui-corner-all "   *ngIf="!constructionForm.controls['construction_description'].valid&&(!constructionForm.controls['construction_description'].untouched)" >
              <i class="fa fa-close"></i>
              施工内容详述必填
            </div>
          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >上传附件:</label>
          </div>
          <div class="ui-grid-col-11">
            <p-fileUpload  name="file"
                           url="{{ip}}/workflow/construction/upload"
                           multiple="multiple"
                           accept="image/*,application/*,text/*"
                           (onUpload)="onBasicUploadAuto($event)"
                           maxFileSize="3145728"
                           chooseLabel="选择"
                           uploadLabel="上传"
                           cancelLabel="取消"
                           (onBeforeUpload)="onBeforeUpload($event)"
            ></p-fileUpload>
            <ng-template pTemplate="ui-button-text">
              <div>选择文件</div>
            </ng-template>
          </div>
        </div>

      </div>
    </p-panel>

    <div class="ui-grid-row margin-bottom-1vw">
      <div class="ui-grid-col-2">
      </div>
    </div>
    <label></label>
    <div class="" >
      <div class="ui-g">
        <div class="ui-g-10 ui-sm-12" >
          <div class="ui-g-2  ui-sm-5 ui-fluid">
          </div>
          <div class="ui-g-2 ui-sm-5 ui-fluid  ui-no-padding-right-15px ">
          </div>
        </div>
        <div class="ui-g-2 ui-sm-12" >
          <div class="ui-g-6  ui-sm-6  ui-fluid">
            <!--<button   pButton   (click)="updateDeleteStorage()" label="移除" [disabled]="selectConstructions.length === 0 || selectConstructions.length > 1"  ></button>-->
          </div>
          <div class="ui-g-6 ui-sm-6 ui-fluid  ui-no-padding-right-15px ">
            <button pButton   (click)="showAddEquementMask()" label="添加设备"  [disabled]="isButtonValueValid()"></button>
          </div>
        </div>
      </div>
    </div>
    <label><span></span>设备列表</label>
    <p-dataTable [value]="editInspections" (onLazyLoad)="loadCarsLazy($event)" [lazy]="true" [rows]="10" [paginator]="true"
                 [totalRecords]="totalRecords"  [(selection)]="selectConstructions" [editable]="true"   [rowsPerPageOptions]="[5,10,20]">
      <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
      <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}" [editable]="col.editable"></p-column>
      <ng-template pTemplate="emptymessage" >
        当前没有数据
      </ng-template>
      <p-column header="操作">
        <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
          <button  pButton type="button"  label="移除"   (click)="updateDeleteStorage()" [disabled]="selectConstructions.length === 0 || selectConstructions.length > 1"></button>
        </ng-template>
      </p-column>
    </p-dataTable>
  </form>

</div>
<!--<div>-->
  <!--<input type="text" [(ngModel)] = "equips"/>-->
  <!--<app-add-equement [equip]="equips"></app-add-equement>-->
<!--</div>-->
<app-add-equement
  *ngIf="showAddEquement"
  (closeEquement)="closeAddEquementMask($event)"
  (addDev)="addDev($event)"
  [equip]="submitData.construct_location"
></app-add-equement>
<app-personal-dialog
  *ngIf="displayPersonel"
  (dataEmitter)="dataEmitter($event)"
  (displayEmitter)="displayEmitter($event)">
</app-personal-dialog>
<app-construction-location
  *ngIf="displayLocation"
  (closeLocation)="closeAddLocationMask($event)"
  (addTree)="addConstructionOrg($event)"
></app-construction-location>
<app-affect-location
  *ngIf="displayaffectLocation"
  (closeaffectLocation)="closeaffectLocationMask($event)"
  (addTreeAffect)="addConstructionAffectLocation($event)"
></app-affect-location>
